const express = require('express');
const router = express.Router();

const userCtrl = require('../../controller/user')

//校验
const auth = require('../../middleware/webAuth')
const userValidata = require('../../validator/user')


// 用户登录
router.post('/login', userValidata.login, userCtrl.login)

// 工号登录
router.post('/worker', userCtrl.worker)

// 用户修改信息
router.put('/updatedUser/:userId', userValidata.updatedUser, userCtrl.updatedUser)

// 用户修改密码
router.put('/updatedPws/:userId', userValidata.updatedPws, userCtrl.updatedPws)

module.exports = router


